cmake: do not pin the sigc++-2 code path to C++11 - #825
Open
plusky wants to merge 1 commit into
Open
Conversation
FindSIGC.cmake and FindSIGC2.cmake put "--std=c++11" into the compile flags of
every target that links libsigc++-2.0. That flag lands last on the command line,
so it overrides CMAKE_CXX_STANDARD and the level cannot be raised from outside
the project.
Qt 6 headers no longer compile as C++11: <QtCore/qnumeric.h> pulls in
qcheckedint_impl.h, which needs constexpr lambdas, three-way comparison and the
qSubOverflow overloads introduced in C++17. Building 26.05.1 against Qt 6.11
therefore fails in async/qt and qtel with, among others:
qcheckedint_impl.h:301:5: error: the type '...::<lambda()>' of 'constexpr'
variable 'f' is not literal
qcheckedint_impl.h:292:35: error: no matching function for call to
'compareThreeWay(int&, int&)'
libsigc++-2.0 builds fine at any level from C++11 upwards, and the sigc++-3.0
branch directly above already asks for C++17, so aligning the 2.x branch on
C++17 costs nothing and unblocks Qt 6.
Found while updating the openSUSE package from 19.09.2 to 26.05.1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FindSIGC.cmake and FindSIGC2.cmake put
--std=c++11into the compile flags of every target that links libsigc++-2.0. That flag lands last on the command line, so it overridesCMAKE_CXX_STANDARDand the level cannot be raised from outside the project.Qt 6 headers no longer compile as C++11:
<QtCore/qnumeric.h>pulls inqcheckedint_impl.h, which needs constexpr lambdas, three-way comparison and theqSubOverflowoverloads introduced in C++17. Building 26.05.1 against Qt 6.11 therefore fails inasync/qtandqtelwith, among others:libsigc++-2.0 builds fine at any level from C++11 upwards, and the sigc++-3.0 branch directly above already asks for C++17, so aligning the 2.x branch on C++17 costs nothing and unblocks Qt 6.
Found while updating the openSUSE package from 19.09.2 to 26.05.1; with this change the full build (including qtel against Qt 6.11.1) succeeds.